package com.sneakxy.cloudbase.platform.service;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.sneakxy.cloudbase.platform.bean.dto.LauncherDTO;
import com.sneakxy.cloudbase.platform.utils.web.DataGrid;
import com.sneakxy.cloudbase.platform.utils.web.PageSearch;
import com.sneakxy.cloudbase.platform.utils.web.Response;

@FeignClient(name="security-producer", path = "/security/api/launcher")
public interface LauncherClient {

	@PostMapping("datagrid")
	public Response<DataGrid<LauncherDTO>> datagrid(@SpringQueryMap PageSearch<String> search);
	
	@PostMapping("add")
	public Response<LauncherDTO> add(@SpringQueryMap LauncherDTO launcher);
	
	@PostMapping("edit")
	public Response<LauncherDTO> edit(@SpringQueryMap LauncherDTO launcher);
	
	@PostMapping("remove")
	public Response<String> remove(@RequestParam(name="ids", required = true) String[] ids);
	
	@PostMapping("launcherModules")
	public Response<List<String>> launcherModules();
	
	@PostMapping("all")
	public Response<List<LauncherDTO>> all();
	
	@PostMapping("one")
	public Response<LauncherDTO> one(
			@RequestParam(name="launcherId", required = true)
			String launcherId);
	
}
